<template>
  <div>
    <el-button type="success" @click="av">{{
      store.state.appStore.countVuex
    }}</el-button>
  </div>
</template>

<script setup lang="ts">
import { useStore } from "vuex";
import { onMounted } from "vue";
import { throttle } from "../utils/btnThrottle";
const store = useStore();
onMounted(() => {
  addAcountVuex();
});
const addAcountVuex = () => {
  store.dispatch("ADD_ACOUNTVUEX", store.state.appStore.countVuex + 1);
};
let av: Function = throttle(addAcountVuex);
</script>

<style lang="scss" scoped></style>
